home *** CD-ROM | disk | FTP | other *** search
/ Micromanía 85 / CDMM85_1.ISO / Monopoly Tycoon / MTycoonDemo.exe / data1.cab / scripts / TUTORIAL6A / hub.lua
Encoding:
Text File  |  2001-10-24  |  2.2 KB  |  78 lines

  1. PromptHeading = ID_TUTORIAL_6A_OFFSET + 1
  2. g_currentprompt = 0;
  3. g_counter = 0;
  4. Tweaks.numyearsin24hours = 0;
  5.  
  6. -------------------------------------------------------------------------------------------------
  7. -- INITIALISE_Level. Standard level event
  8. -------------------------------------------------------------------------------------------------
  9. function EVENTINITIALISE_Level()
  10.     -- load the building and business file
  11.     C_RunScript("scripts\\maps\\tempmap.lua");
  12.     C_RunScript("scripts\\tutorial4\\initialpref.lua");
  13.  
  14. end;
  15.  
  16. -------------------------------------------------------------------------------------------------
  17. -- Level. Standard level event.
  18. -------------------------------------------------------------------------------------------------
  19. function EVENT_Level()
  20.     -- create an initial prompt
  21.     C_TriggerEvent("BlockCam", 1, PACIFIC_AVENUE);
  22.  
  23.     Interface.DisableAllControls();
  24.     Interface.DisableAll3DPicking();
  25. --    Interface.DisableCameraControl();
  26.  
  27.     -- create the initial prompt
  28.     CreatePrompt(1);
  29. end;
  30.  
  31. function CATCHEVENT_InterfacePromptDismiss(a)
  32.     CreatePrompt(a);
  33. end;
  34.  
  35. function CATCHEVENT_TutorialEvent(a)
  36.  
  37.     if a == TUT_MPP_BUILDING_RIGHT_TOGGLE and g_currentprompt == 6 then
  38.         Interface.DismissPrompt();
  39.         Interface.DisableControl(TUT_MPP_BUILDING_RIGHT_TOGGLE);
  40.     end;
  41.  
  42.     if a == TUT_MPP_BUILDING_RIGHT_TOGGLE and g_currentprompt == 5 then
  43.         Interface.DismissPrompt();
  44.     end;
  45.  
  46.     if a == TUT_MPP_BUILDING_RIGHT_TOGGLE and g_currentprompt == 4 then
  47.         Interface.DismissPrompt();
  48.     end;
  49. end;
  50.  
  51. function CATCHEVENT_Picked3D(a)
  52.  
  53.     if g_currentprompt == 2 then
  54.         Interface.DismissPrompt();
  55.         Interface.DisableAll3DPicking();
  56.     end;
  57.  
  58.     if g_currentprompt == 11 then
  59.         Interface.DismissPrompt();
  60.         Interface.DisableAll3DPicking();
  61.     end;
  62.  
  63. end;
  64.  
  65. -- prompt manager
  66. function CreatePrompt(a)
  67.     g_currentprompt = a;
  68.     body = a+PromptHeading;
  69.     if a == 1 then
  70.         Interface.CreatePrompt(PromptHeading,body, a+1); --"Now let's look at what you can do with buildings. ", a+1);
  71.     elseif a == 2 then
  72.         Interface.CreatePrompt(PromptHeading,body, a+1); --"Lets click on this building here...", a+1);
  73.     elseif a == 3 then
  74.         Game.End(true);
  75.     end;
  76. end;
  77.  
  78.